<?php
	//设置权限
	if(isset($_SESSION['islogin'])){
		$smarty->assign('admin',1);
	}
	//读取博文数据
	$article = getArticle($_GET['article']);
	addArticleView($_GET['article']);
	$article['content']=stripslashes($article['content']);

	$smarty->assign('indexURL',getConfig('url'));
	$smarty->assign('article',$article);
	$smarty->assign('artkind',getArtkind($article['kindid']));
	$smarty->assign('time',turnTimeToDate($article['pubtime'],1));
	//检测登录
	if(isset($_SESSION['userid'])){
		$user = getUserById($_SESSION['userid']);
		$smarty->assign('user',$user);
	}
	//站点标题
	$sitetitle = $article['title'];
	$sitetitle.= ' - '.getConfig('title');
	$sitetitle.=' - Powered by MoodBlog';
	$smarty->assign('sitetitle',$sitetitle);

	$smarty->display($_config['root']."templete/{$style}/viewport.html");
?>